<?php
class App_Model_DbTable_Acl_Access extends Ext_Db_Table
{
    protected $_name = 'acl_access';
    
    private $_accessRow = array();

    public function getRowById($_accessId)
    {        
        if(!$_accessId)
        {
            return "";
        }
        
        if(isset($this->_accessRow[$_accessId]))
        {
            return $this->_accessRow[$_accessId];
        }
        
        $db = $this->getAdapter();
        $safe = $db->quoteInto(" id = ? ", $_accessId);
        $row = $this->fetchRow($safe);
        
        if (!$row) {
            return "";
        }
        $_accessRow = $row->toArray();
        
        $this->_accessRow[$_accessId] = $_accessRow;
        
        return $_accessRow;
    }
    
    public function getAll()
    {
        $select = $this->_db->select();
        $select->from($this->_dbprefix.'acl_access', '*');
        $select->order('id ASC');
        $sql = $select->__toString();

        return $this->_db->fetchAll($sql);
    }

}
